Searching PHP strings

Searching PHP strings

am 29.09.2006 03:12:18 von Ron Piggott

--=-aTz36bujBFWpO3kEbMyj
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I have been playing tonight for a few minutes.

The following code:


$lineArray = file("/home/actsmin/www/home_page.html");

// make an empty variable first
$content = "";

// concat all array element
foreach($lineArray as $eachLine) {

if ( eregi("
#line contains a link

echo strlen(stristr($eachLine, "
echo trim(stristr($eachLine, "
}

$content .= $eachLine;
}

?>

Produces me output like:

137

.



What I want to do now is to remove the

here.



Would someone help me do this?

Ron

--=-aTz36bujBFWpO3kEbMyj--

RE: Searching PHP strings

am 29.09.2006 03:39:18 von Bastien Koert

eregi_replace or str_replace can do that for you

Bastien


>From: "Ron Piggott (PHP)"
>Reply-To: ron.php@actsministries.org
>To: PHP DB
>Subject: [PHP-DB] Searching PHP strings
>Date: Thu, 28 Sep 2006 21:12:18 -0400
>
>I have been playing tonight for a few minutes.
>
>The following code:
>
> >
>$lineArray = file("/home/actsmin/www/home_page.html");
>
>// make an empty variable first
>$content = "";
>
>// concat all array element
>foreach($lineArray as $eachLine) {
>
>if ( eregi(" >
>#line contains a link
>
>echo strlen(stristr($eachLine, "
>echo trim(stristr($eachLine, " >
>}
>
>$content .= $eachLine;
>}
>
>?>
>
>Produces me output like:
>
>137
>
>
>href="http://www.actsministrieschristianevangelism.org/chri stianliving/quiet_time_quotations_and_reflection_topics.html ">here.


>
>What I want to do now is to remove the
>
>here.


>
>Would someone help me do this?
>
>Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php